package com.zhike.common.repository;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Document(collection = "collect")
@Data
public class Collect {

    @Id
    private String logId;

    @ApiModelProperty(value = "消息ID")
    private String messageId;

    @ApiModelProperty(value = "消息内容")
    private String content;

    @ApiModelProperty(value = "消息原发送人")
    private String senderUid;

    private String senderNickname;

    @ApiModelProperty(value = "收藏人UID")
    private String uid;

    @ApiModelProperty(value = "收藏类型", example = "0:文本 1图片 2音频 5文件 6视频")
    private String type;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "收藏时间")
    private Date timestamp;
}
